projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b231a40
)
treepath: Use g_renew()
author
Benjamin Otte
<otte@redhat.com>
Fri, 6 Mar 2020 03:31:30 +0000
(
04:31
+0100)
committer
Benjamin Otte
<otte@redhat.com>
Fri, 6 Mar 2020 04:43:56 +0000
(
05:43
+0100)
gtk/gtktreemodel.c
patch
|
blob
|
history
diff --git
a/gtk/gtktreemodel.c
b/gtk/gtktreemodel.c
index 226791ab5aac71f4f7a4b27bb2f4fc438045ca98..6a3467474944ed30ec03bcc38bd29d09f4fbedfb 100644
(file)
--- a/
gtk/gtktreemodel.c
+++ b/
gtk/gtktreemodel.c
@@
-802,12
+802,8
@@
gtk_tree_path_append_index (GtkTreePath *path,
if (path->depth == path->alloc)
{
- gint *indices;
path->alloc = MAX (path->alloc * 2, 1);
- indices = g_new (gint, path->alloc);
- memcpy (indices, path->indices, path->depth * sizeof (gint));
- g_free (path->indices);
- path->indices = indices;
+ path->indices = g_renew (gint, path->indices, path->alloc);
}
path->depth += 1;